 package com.sina.finance.api.sdk;

 public abstract class StringUtils
 {
   public static boolean isEmpty(String paramString)
   {
     int i;
     if ((paramString == null) || ((i = paramString.length()) == 0)) {
       return true;
     }
     for (int j = 0; j < i; j++) {
       if (!Character.isWhitespace(paramString.charAt(j))) {
         return false;
       }
     }
     return true;
   }

   public static boolean isNumeric(Object paramObject)
   {
     if (paramObject == null) {
       return false;
     }
     String str = paramObject.toString();
     int i = str.length();
     for (int j = 0; j < i; j++) {
       if (!Character.isDigit(str.charAt(j))) {
         return false;
       }
     }
     return true;
   }

   public static boolean areNotEmpty(String[] paramArrayOfString)
   {
     boolean bool = true;
     if ((paramArrayOfString == null) || (paramArrayOfString.length == 0))
       bool = false;
     else {
       for (String str : paramArrayOfString) {
         bool &= !isEmpty(str);
       }
     }
     return bool;
   }

   public static String unicodeToChinese(String paramString)
   {
     StringBuilder localStringBuilder = new StringBuilder();
     if (!isEmpty(paramString)) {
       for (int i = 0; i < paramString.length(); i++) {
         localStringBuilder.append(paramString.charAt(i));
       }
     }
     return localStringBuilder.toString();
   }

   public static String stripNonValidXMLCharacters(String paramString)
   {
     if ((paramString == null) || ("".equals(paramString)))
       return "";
     StringBuilder localStringBuilder = new StringBuilder();

     for (int j = 0; j < paramString.length(); j++) {
       int i = paramString.charAt(j);
       if ((i == 9) || (i == 10) || (i == 13) || ((i >= 32) && (i <= 55295)) || ((i >= 57344) && (i <= 65533)) || ((i >= 65536) && (i <= 1114111)))
       {
         localStringBuilder.append(i);
       }
     }
     return localStringBuilder.toString();
   }
 }

